// To parse this JSON data, do
//
//     final deviceInfoModel = deviceInfoModelFromJson(jsonString);

import 'dart:convert';

DeviceInfoModel deviceInfoModelFromJson(String str) => DeviceInfoModel.fromJson(json.decode(str));

String deviceInfoModelToJson(DeviceInfoModel data) => json.encode(data.toJson());

class DeviceInfoModel {
  DeviceInfoModel({
    this.devSn,
    this.devType,
    this.cidValue,
    this.cleanTds,
    this.devStatus,
    this.firstValue,
    this.usedDays,
    this.updateTime,
    this.thirdValue,
    this.remainDays,
    this.createBy,
    this.createTime,
    this.secondValue,
    this.lacValue,
    this.remainFlow,
    this.screenStatus,
    this.usedFlow,
    this.fifthValue,
    this.id,
    this.userType,
    this.fouthValue,
    this.oriTds,
    this.channelId,
    this.devAccount,
    this.firstBfb,
    this.secondBfb,
    this.thirdBfb,
    this.fouthBfb,
    this.fifthBfb,
  });

  String? devSn;
  String? devType;
  num? cidValue;
  num? cleanTds;
  String? devStatus;
  num? firstValue;
  num? firstBfb;

  num? usedDays;
  String? updateTime;
  num? thirdValue;
  num? thirdBfb;

  num? remainDays;
  String? createBy;
  String? createTime;
  num? secondValue;
  num? secondBfb;

  num? lacValue;
  num? remainFlow;
  String? screenStatus;
  num? usedFlow;
  num? fifthValue;
  num? fifthBfb;

  String? id;
  String? userType;
  num? fouthValue;
  num? fouthBfb;

  num? oriTds;
  String? channelId;
  DevAccount? devAccount;

  factory DeviceInfoModel.fromJson(Map<String, dynamic> json) => DeviceInfoModel(
        devSn: json["devSn"],
        devType: json["devType"],
        cidValue: json["cidValue"],
        cleanTds: json["cleanTds"],
        devStatus: json["devStatus"],
        firstValue: json["firstValue"],
        usedDays: json["usedDays"],
        updateTime: json["updateTime"],
        thirdValue: json["thirdValue"],
        remainDays: json["remainDays"],
        createBy: json["createBy"],
        createTime: json["createTime"],
        secondValue: json["secondValue"],
        lacValue: json["lacValue"],
        remainFlow: json["remainFlow"],
        screenStatus: json["screenStatus"],
        usedFlow: json["usedFlow"],
        fifthValue: json["fifthValue"],
        id: json["id"],
        userType: json["userType"],
        fouthValue: json["fouthValue"],
        oriTds: json["oriTds"],
        channelId: json["channelId"],
        devAccount: json["devAccount"] == null ? null : DevAccount.fromJson(json["devAccount"]),
        firstBfb: json['firstBfb'],
        secondBfb: json['secondBfb'],
        thirdBfb: json['thirdBfb'],
        fouthBfb: json['fouthBfb'],
        fifthBfb: json['fifthBfb'],
      );

  Map<String, dynamic> toJson() => {
        "devSn": devSn,
        "devType": devType,
        "cidValue": cidValue,
        "cleanTds": cleanTds,
        "devStatus": devStatus,
        "firstValue": firstValue,
        "usedDays": usedDays,
        "updateTime": updateTime,
        "thirdValue": thirdValue,
        "remainDays": remainDays,
        "createBy": createBy,
        "createTime": createTime,
        "secondValue": secondValue,
        "lacValue": lacValue,
        "remainFlow": remainFlow,
        "screenStatus": screenStatus,
        "usedFlow": usedFlow,
        "fifthValue": fifthValue,
        "id": id,
        "userType": userType,
        "fouthValue": fouthValue,
        "oriTds": oriTds,
        "channelId": channelId,
        "devAccount": devAccount?.toJson(),
      };
}

class DevAccount {
  DevAccount({
    this.id,
    this.devId,
    this.devSn,
    this.usedDays,
    this.accountAmount,
    this.payCount,
    this.createTime,
    this.updateTime,
  });

  String? id;
  String? devId;
  String? devSn;
  int? usedDays;
  int? accountAmount;
  int? payCount;
  String? createTime;
  String? updateTime;

  factory DevAccount.fromJson(Map<String, dynamic> json) => DevAccount(
        id: json["id"],
        devId: json["devId"],
        devSn: json["devSn"],
        usedDays: json["usedDays"],
        accountAmount: json["accountAmount"],
        payCount: json["payCount"],
        createTime: json["createTime"],
        updateTime: json["updateTime"],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "devId": devId,
        "devSn": devSn,
        "usedDays": usedDays,
        "accountAmount": accountAmount,
        "payCount": payCount,
        "createTime": createTime,
        "updateTime": updateTime,
      };
}
